package design_patterns

import "fmt"

type Earpods interface {
	PlayMusic()
	AnswerPhone()
}

type MiPods struct{}

func (m MiPods) PlayMusic() {
	fmt.Println("Mi Pods Play Music")
}

func (m MiPods) AnswerPhone() {
	fmt.Println("Mi Pods Answer the Phone")
}

type HuaWeiPods struct{}

func (hp HuaWeiPods) PlayMusic() {
	fmt.Println("HuaWei Pods Play Music")
}

func (hp HuaWeiPods) AnswerPhone() {
	fmt.Println("HuaWei Pods Answer the Phone")
}

type BrandFactory interface {
	CreateMobile() Mobile
	CreateEarpods() Earpods
}

type HuaWeiFactory struct {
}

func (h HuaWeiFactory) CreateMobile() {
	fmt.Println("Huawei Mobile")
}

func (h HuaWeiFactory) CreateEarpods() {
	fmt.Println("Huawei Earpods")
}

type XiaoMiFactory struct{}

func (m XiaoMiFactory) CreateMobile() {
	fmt.Println("xiaomi Mobile")
}

func (m XiaoMiFactory) CreateEarpods() {
	fmt.Println("xiaomi Earpods")
}
